package com.traffic.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.traffic.mapper.PerHandoverManagementMapper;
import com.traffic.domain.PerHandoverManagement;
import com.traffic.service.IPerHandoverManagementService;

/**
 * 交接管理Service业务层处理
 * 
 * @author 郭世纪
 * @date 2024-12-08
 */
@Service
public class PerHandoverManagementServiceImpl implements IPerHandoverManagementService 
{
    @Autowired
    private PerHandoverManagementMapper perHandoverManagementMapper;

    /**
     * 查询交接管理
     * 
     * @param handoverId 交接管理主键
     * @return 交接管理
     */
    @Override
    public PerHandoverManagement selectPerHandoverManagementByHandoverId(Long handoverId)
    {
        return perHandoverManagementMapper.selectPerHandoverManagementByHandoverId(handoverId);
    }

    /**
     * 查询交接管理列表
     * 
     * @param perHandoverManagement 交接管理
     * @return 交接管理
     */
    @Override
    public List<PerHandoverManagement> selectPerHandoverManagementList(PerHandoverManagement perHandoverManagement)
    {
        return perHandoverManagementMapper.selectPerHandoverManagementList(perHandoverManagement);
    }

    /**
     * 新增交接管理
     * 
     * @param perHandoverManagement 交接管理
     * @return 结果
     */
    @Override
    public int insertPerHandoverManagement(PerHandoverManagement perHandoverManagement)
    {
        return perHandoverManagementMapper.insertPerHandoverManagement(perHandoverManagement);
    }

    /**
     * 修改交接管理
     * 
     * @param perHandoverManagement 交接管理
     * @return 结果
     */
    @Override
    public int updatePerHandoverManagement(PerHandoverManagement perHandoverManagement)
    {
        perHandoverManagement.setUpdateTime(DateUtils.getNowDate());
        return perHandoverManagementMapper.updatePerHandoverManagement(perHandoverManagement);
    }

    /**
     * 批量删除交接管理
     * 
     * @param handoverIds 需要删除的交接管理主键
     * @return 结果
     */
    @Override
    public int deletePerHandoverManagementByHandoverIds(Long[] handoverIds)
    {
        return perHandoverManagementMapper.deletePerHandoverManagementByHandoverIds(handoverIds);
    }

    /**
     * 删除交接管理信息
     * 
     * @param handoverId 交接管理主键
     * @return 结果
     */
    @Override
    public int deletePerHandoverManagementByHandoverId(Long handoverId)
    {
        return perHandoverManagementMapper.deletePerHandoverManagementByHandoverId(handoverId);
    }
}
